package com.stcc.base.banner;

import com.stcc.base.context.SpringContextHolder;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

import java.text.MessageFormat;

/**
 * 描述:打印Banner
 * 项目名:stcc-gl
 * 包名:com.stcc.base.banner
 * 作者:stcc
 * 创建时间:2021/2/2 14:56
 * 版本:1.0
 */

@Component
public class BannerKit implements CommandLineRunner {
    public BannerKit() {
    }

    public void run(String... args){
        Environment env = SpringContextHolder.getBean(Environment.class);
        System.out.println("***************************[超叔管理平台应用启动成功]**************************\n*                                                                          *\n" + MessageFormat.format("*          ================[{0}]================         *\n", env.getProperty("protal.domain")) + "*                                                                          *\n****************************************************************************");
    }
}
